<template>

  <div class="studentSituationFinishTable">
    <el-table :data="studentSituationStore.stuSituationFinishData" style="width: 100%; height: 100%; font-size: 18px;">
      <el-table-column prop="name" label="问卷名称" min-width="220"/>
      <el-table-column prop="startTime" label="开始时间" min-width="80"/>
      <el-table-column prop="endTime" label="结束时间" min-width="80"/>
      <el-table-column prop="state" label="任务状态"  min-width="50"/>
      <el-table-column prop="do" label="操作" width="120" >
        <template #default="{row}">
          <el-button link type="primary" size="large" @click="studentfinishClick(row)" style="font-size: 18px; color: #071c7b;">
            查看详情
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>  

</template>

<script setup>
import router from '@/router';
import { onBeforeMount } from 'vue'
import { useStudentSituationStore } from '@/stores/student/studentSituation';

const studentSituationStore = useStudentSituationStore()


onBeforeMount(() => {
 studentSituationStore.stuSituationFinishRequest()
})

const studentfinishClick = (row) => {
  router.push({
    name:'stufinishDetail',
    query:{id:row.id}
  })
  localStorage.href
}

// const studentFinishData = [
//   {
//     name: '2023-2024学年学业情况',
//     starttime: '2024-06-11',
//     finishtime: '2024-07-11',
//     state: '已完成',
//   },
//   {
//     name: '2023-2024学年学业情况',
//     starttime: '2024-06-11',
//     finishtime: '2024-07-11',
//     state: '已完成',
//   },
// ]
</script>

<style scoped lang="scss">
.studentSituationFinishTable {
  width: 100%;
  height: 100%;      
  background-color: #fff;
  padding: 10px;

  .unfinish {
    color: #b31219;
  }
  .change {
    color: #5328e3;
  }
}
</style>